package com.ruoyi.ring.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ring.mapper.RingStressChangeMapper;
import com.ruoyi.ring.domain.RingStressChange;
import com.ruoyi.ring.service.IRingStressChangeService;

/**
 * 压力详情Service业务层处理
 * 
 * @author liuwp
 * @date 2025-09-03
 */
@Service
public class RingStressChangeServiceImpl implements IRingStressChangeService 
{
    @Autowired
    private RingStressChangeMapper ringStressChangeMapper;

    /**
     * 查询压力详情
     * 
     * @param id 压力详情主键
     * @return 压力详情
     */
    @Override
    public RingStressChange selectRingStressChangeById(Long id)
    {
        return ringStressChangeMapper.selectRingStressChangeById(id);
    }

    /**
     * 查询压力详情列表
     * 
     * @param ringStressChange 压力详情
     * @return 压力详情
     */
    @Override
    public List<RingStressChange> selectRingStressChangeList(RingStressChange ringStressChange)
    {
        return ringStressChangeMapper.selectRingStressChangeList(ringStressChange);
    }

    /**
     * 根据业务主键查询一条记录：压力详情
     *
     * @param ringStressChange 压力详情
     * @return 压力详情
     */
    @Override
    public RingStressChange selectOneRingStressChange(RingStressChange ringStressChange)
    {
        return ringStressChangeMapper.selectOneRingStressChange(ringStressChange);
    }

    /**
     * 新增压力详情
     * 
     * @param ringStressChange 压力详情
     * @return 结果
     */
    @Override
    public int insertRingStressChange(RingStressChange ringStressChange)
    {
        ringStressChange.setCreateTime(DateUtils.getNowDate());
        return ringStressChangeMapper.insertRingStressChange(ringStressChange);
    }

    /**
     * 修改压力详情
     * 
     * @param ringStressChange 压力详情
     * @return 结果
     */
    @Override
    public int updateRingStressChange(RingStressChange ringStressChange)
    {
        ringStressChange.setUpdateTime(DateUtils.getNowDate());
        return ringStressChangeMapper.updateRingStressChange(ringStressChange);
    }

    @Override
    public int updateRingStressChangeCondition(RingStressChange ringStressChange, RingStressChange ringStressChangeCondition)
    {
                ringStressChange.setUpdateTime(DateUtils.getNowDate());
        return ringStressChangeMapper.updateRingStressChangeCondition(ringStressChange, ringStressChangeCondition);
    }

    /**
     * 批量删除压力详情
     * 
     * @param ids 需要删除的压力详情主键
     * @return 结果
     */
    @Override
    public int deleteRingStressChangeByIds(Long[] ids)
    {
        return ringStressChangeMapper.deleteRingStressChangeByIds(ids);
    }

    /**
     * 删除压力详情信息
     * 
     * @param id 压力详情主键
     * @return 结果
     */
    @Override
    public int deleteRingStressChangeById(Long id)
    {
        return ringStressChangeMapper.deleteRingStressChangeById(id);
    }

    /**
     * 条件删除压力详情
     *
     * @param ringStressChange 压力详情
     * @return 结果
     */
    @Override
    public int deleteRingStressChangeByCondition(RingStressChange ringStressChange)
    {
        return ringStressChangeMapper.deleteRingStressChangeByCondition(ringStressChange);
    }

}
